#!/bin/sh
# create by LiHong
# IBM Portal 安装依赖包检查
depLibs=(
    'gtk2'
    'libXtst'
    'gtk2-engines'
    'libcanberra-gtk2'
    'PackageKit-gtk-module'
)
LISTFILE=/tmp/installed-rpm-list
rpm -qa > $LISTFILE

for i in "${!depLibs[@]}"; do
    r=`grep -s "\<${depLibs[$i]}\>" /tmp/rpms`
    if [ "${r}" = "" ]; then
        echo ${depLibs[$i]} NOT FOUND!
    fi
done

rm -f $LISTFILE